<?php

$this->pageTitle = 'Top co authors';
$this->pageSummary = sprintf(
	'Top co authors of \'%s\'.
	<p><em>Explanation:</em> This page shows the top 10 co-authors of this author, according to the DBLP application of the NEON-project (<a href="http://neon-project.org/aspl-v2/">http://neon-project.org/aspl-v2/</a>).</p>',
	$this->author
);
$this->navigationMenu()->addDefaultItems();
$this->actionBar()->addAction('Back to publications of '. $this->author, sprintf($this->baseUrl('/page/author/%s/'), $this->author));
$this->actionBar()->addAction('Visual overview of publications', sprintf($this->baseUrl('/page/author/graph/%s/'), $this->author));
$this->actionBar()->addAction('World map of publications', sprintf($this->baseUrl('/page/author/worldmap/%s/'), $this->author));
$this->actionBar()->addAction('Topics of author', sprintf($this->baseUrl('/page/author/topics/%s/'), $this->author));

$this->navigation()->findById('author_index')->setLabel($this->author);
$this->navigation()->findById('author_index')->setParams(array('queryparam'=>$this->author));

if(count($this->coauthors) == 0){
	echo 'No co authors found';
}
else{
	$arr = $this->coauthors;
	
	$item['id'] = preg_replace('/\s+?/', '', $this->author);
	$item['text'] = $this->author;
	$item['connections'] = array();
	
	$data[] = $item;
	
	for($i=0; $i<count($arr); $i++) {

		$item = array('id' => preg_replace('/\s+?/', '', $arr[$i]), 'text' => $arr[$i], 'connections' => array());

 	    $linkStrength = 1;

		$item['connections'][] = preg_replace('/\s+?/', '', $this->author);		

		$data[] = $item;
	}
} 
?>	
	
        <script type="text/javascript"> 
            if(typeof window.onload == 'function')
               var old_onload = window.onload;
            else
               var old_onload = function() {};
 
            window.onload = function() {
			var data = <?php echo json_encode($data); ?>;
			var wheel = new MooWheel(data, $('canvasObj'), {radialMultiplier: 10});
               
               old_onload();
            };
        </script> 
		<div id="canvasObj"></div> 

  